﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using DevExpress.Xpo;
namespace ChuanPlus.DAO
{
    class CustomerDAO
    {   //
        // get All customer
        //
        public static List<Customer> GetAllCustomer()
        {
            XPQuery<Customer> invoices = new XPQuery<Customer>(Session.DefaultSession);
            var list = from inv in invoices
                       select inv;
            List<Customer> arr = new List<Customer>(list.AsEnumerable<Customer>());
            return arr;
        }
        //
        //get customer by name
        //
        public static Customer GetCustomer(string name)
        {
            return null;
        }
        //
        //return customer info and sale amount per customer
        //
        public static ArrayList GetTotalSalesPerCustomer(DateTime fromDate, DateTime toDate)
        {
            return null;
        }
    }
}
